﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
	CodeBehind="CouncilList.aspx.cs" Inherits="SBACN.WebSite.Admin.AboutGuild.CouncilList" %>

<%@ Register Src="../../UC/Pager.ascx" TagName="Pager" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
	<script type="text/javascript">
		function Open_Click(cid) {
			if (confirm("确定要启用此届理事会吗？")) {
				document.getElementById("<%= Hid_ID.ClientID %>").value = cid;
				document.getElementById("<%= Btn_Close.ClientID %>").click();
			}
		}

		function RefreshNewsList() {
			if (document.getElementById("<%= btn_NewsRefresh.ClientID%>")) {
				document.getElementById("<%= btn_NewsRefresh.ClientID%>").click();
			}
		}
	</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-stroke2">
		<tr>
			<td width="30%" class="form-title2">
				理事会名称
			</td>
			<td width="30%" class="form-title2">
				理事会英文名称
			</td>
			<td width="10%" class="form-title2">
				开始时间
			</td>
			<td width="10%" class="form-title2">
				结束时间
			</td>
			<td width="8%" class="form-title2">
				状态
			</td>
			<td width="10%" class="form-title2">
				操作
			</td>
		</tr>
		<asp:Repeater ID="List" runat="server">
			<ItemTemplate>
				<tr>
					<td class="formbodyleft">
						<%# Eval("Name")%>
					</td>
					<td class="form-body">
						<%# Eval("EnName")%>
					</td>
					<td class="form-body">
						<%# Convert.ToDateTime(Eval("StartTime")).ToString("yyyy-MM-dd") == "0001-01-01" ? "" : Convert.ToDateTime(Eval("StartTime")).ToString("yyyy-MM-dd")%>
					</td>
					<td class="form-body">
						<%# Convert.ToDateTime(Eval("EndTime")).ToString("yyyy-MM-dd") == "0001-01-01" ? "至今" : Convert.ToDateTime(Eval("EndTime")).ToString("yyyy-MM-dd")%>
					</td>
					<td class="form-body">
						<%# Convert.ToBoolean(Eval("Status"))? "启用":"<font color='red'>停用</font>" %>
					</td>
					<td class="form-body">
						<a href="CouncilUpdate.aspx?cid=<%# Eval("Index") %>&st=<%= SystemType %>" target="_blank">
							编辑</a>&nbsp;&nbsp;<span onclick="Open_Click(<%# Eval("Index")%>);"><a runat="server" href="javascript:void(0);" visible='<%# !Convert.ToBoolean( Eval("Status")) %>'>启用</a>
						</span>
					</td>
				</tr>
			</ItemTemplate>
			<AlternatingItemTemplate>
				<tr>
					<td class="formbodyleft">
						<%# Eval("Name")%>
					</td>
					<td class="form-body">
						<%# Eval("EnName")%>
					</td>
					<td class="form-body">
						<%# Convert.ToDateTime(Eval("StartTime")).ToString("yyyy-MM-dd") == "0001-01-01" ? "" : Convert.ToDateTime(Eval("StartTime")).ToString("yyyy-MM-dd")%>
					</td>
					<td class="form-body">
						<%# Convert.ToDateTime(Eval("EndTime")).ToString("yyyy-MM-dd") == "0001-01-01" ? "至今" : Convert.ToDateTime(Eval("EndTime")).ToString("yyyy-MM-dd")%>
					</td>
					<td class="form-body">
						<%# Convert.ToBoolean(Eval("Status"))? "启用":"<font color='red'>停用</font>" %>
					</td>
					<td class="form-body">
						<a href="CouncilUpdate.aspx?cid=<%# Eval("Index") %>&st=<%= SystemType %>" target="_blank">
							编辑</a>&nbsp;&nbsp; <span onclick="Open_Click(<%# Eval("Index")%>);"><a runat="server"
								href="javascript:void(0);" visible='<%# !Convert.ToBoolean( Eval("Status")) %>'>启用</a>
						</span>
					</td>
				</tr>
			</AlternatingItemTemplate>
		</asp:Repeater>
		<tr>
			<td colspan="6" class="form-body">
				<a href="CouncilAdd.aspx?st=<%= SystemType %>" target="_blank">新增</a>
			</td>
		</tr>
		<tr>
			<td colspan="6">
				<uc1:Pager ID="Pager1" runat="server" OnSelectedPageIndexChanged="BindSelectedPageIndexChanged"
					PageSize="15" />
			</td>
		</tr>
	</table>
	<div style="display: none;">
		<asp:HiddenField runat="server" ID="Hid_ID" />
		<asp:Button runat="server" Text="停用" ID="Btn_Close" OnClick="Close_Click" />
		<asp:Button Text="刷新" ID="btn_NewsRefresh" runat="server" OnClick="btn_NewsRefresh_Click" />
	</div>
</asp:Content>
